﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RMSSever
{
    using System.Net.Sockets;
    using System.Net;
    using System.Threading;

    /// 
    /// Client 的摘要说明。 
    /// 
    public class Client
    {
        private Thread clthread;
        private EndPoint endpoint;
        private string name;
        private Socket sock;

        public Client(string _name, EndPoint _endpoint, Thread _thread, Socket _sock)
        {
            // TODO: 在此处添加构造函数逻辑  
            clthread = _thread;
            endpoint = _endpoint;
            name = _name;
            sock = _sock;
        }

        public override string ToString()  //使用override定义直接覆盖ToString()
        {
            return endpoint.ToString() + " : " + name;
        }
        public Thread CLThread
        {
            get { return clthread; }
            set { clthread = value; }
        }

        public EndPoint Host
        {
            get { return endpoint; }
            set { endpoint = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public Socket Sock
        {
            get { return sock; }
            set { sock = value; }
        }

    }
}
